package kr.go.nih.biomedi.pSEVA.bean;

public class PrinSeq {
	private static PrinSeq instance = new PrinSeq();
	// paramater
	private String realFolder;
	private String inputFile;
	private String inputOption;
	private String FieldSeparator=",";

	public String getRealFolder() {
		return realFolder;
	}

	public void setRealFolder(String realFolder) {
		this.realFolder = realFolder;
	}

	public String getInputFile() {
		return inputFile;
	}

	public void setInputFile(String inputFile) {
		this.inputFile = inputFile;
	}

	public String getInputOption() {
		return inputOption;
	}

	public void setInputOption(String inputOption) {
		this.inputOption = inputOption;
	}

	private static PrinSeq getInstance() {
		if (instance == null) {
			return new PrinSeq();
		} else {
			return instance;
		}
	}
	
	public String doPrinSeqExecute() {
		String prinSeqCmd = "/bin/sh" + FieldSeparator + "-c" + FieldSeparator + "/usr/bin/perl " + "/ldata/home/tslinux/Programs/prinseq-lite-0.14.4/prinseq-lite.pl " 
							+ "-" + this.getInputOption() + " " + this.getRealFolder() + "/" + this.getInputFile() +   
							" -out_format 3 -out_good " + this.getRealFolder() + "/" + this.getInputFile() + ".good -ns_max_p 1 -lc_method dust -lc_threshold 7";
		return prinSeqCmd;
	}
}
